<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>个人信息页</title>
    <link rel="stylesheet" href="CSS/userCenter.css">
    <link rel="shortcut icon" href="images/travelling.ico">
    <script src="js/jquery-3.4.1.min.js"></script>
    <script>
        $(function () {
            $('#head').load('head.html')
            $('#right').load('userCenter_person.html')
            $('#foot').load('foot.html')
            $('#headImg').click(function () {
                $('input[type=file]').trigger('click');
            })
            $("#left input").change(function () {
                var input = document.getElementsByTagName('input')
                var fread = new FileReader()
                fread.onload = function (e) {
                    $('#headImg').css('background-image', 'url(' + e.target.result + ')')
                }
                fread.readAsDataURL(this.files[0])
            })
            $('#navR li').click(function(){
                $(this).attr('class','clk')
                $(this).siblings().attr('class','unclk')
            })
            $('#navR li:eq(0)').click(function () {
                $('#right').load('userCenter_person.html')
            })
            $('#navR li:eq(1)').click(function () {
                $('#right').load('userCenter_strategy.html')
            })
            $('#navR li:eq(2)').click(function () {
                $('#right').load('userCenter_collection.html')
            })
            $('#navR li:eq(3)').click(function () {
                $('#right').load('userCenter_message.html')
            })
            $('#navR li:eq(4)').click(function(){
                var user = localStorage.getItem('user')
                if(user!=''){
                localStorage.setItem('user','')}
            })
        })

    </script>
</head>

<body>
    <div id="head"></div>
    <div id="container"></div>
    <div id="top"></div>
    <div id="navW">
        <div id="navR">
            <ul>
                <li class="clk">个人信息</li>
                <li class="unclk">我的攻略</li>
                <li class="unclk">收藏</li>
                <li class="unclk">消息</li>
                <li class="unclk"><a href="index.html">退出</a></li>
            </ul>
        </div>
    </div>
    <div id="content">
        <div id="left">
            <div id="headImg"></div>
            <form action="#">
                <input type="file" name="" id="">
            </form>
            <span id="userName">姓名</span>
            </ul>
            <div id="d1">
                <a href="#">0</a>
                <a href="#">0</a>
            </div>
            <div id="d2">
                关注|粉丝
            </div>
            <div></div>
        </div>
        <div id="right"></div>
    </div>
    <div id="foot"></div>
</body>

</html>